FROM python:3.12.3-slim

COPY ./crewplus-api/pyproject.toml ./

# RUN pip install --no-cache-dir poetry
RUN pip install poetry --timeout=120 -i https://mirrors.aliyun.com/pypi/simple

RUN poetry config virtualenvs.create false  # Disable virtualenvs for a slimmer image
RUN poetry install --no-interaction --no-ansi

WORKDIR /app

CMD [ "python", "main.py", "run"]